localStorage.setItem('navigation', '<a href="#">首页</a> <a href="">投资集中度管理</a>  <a><cite>数据概览</cite></a>');
layui.use(["element", 'layer'], function () {
  var element = layui.element,
    layer = layui.layer;
});

var vm = new Vue({
  el: '#app',
  data: {
    Positioning: localStorage.getItem('navigation'),
    // html/TZJZDGL/SJGL.html
    dur: GetUrlParam('url') ? GetUrlParam('url') : 'html/TZJZDGL/SJGL.html',
    navID: GetUrlParam('id') ? GetUrlParam('id') : ''
  },
  mounted: function () {
    this.init()
  },
  methods: {
    init: function () {
      if (GetUrlParam('url')) {
        var id = this.navID;
        var dom = $("dd[data-id=nav_"+id+"]");
        var txt = GetUrlParam('txt');
        $(".side-nav-tree li").removeClass("layui-nav-itemed");
        $(".side-nav-tree dd").removeClass("layui-this");
        dom.addClass("layui-this");
        dom.parent().parent().addClass("layui-nav-itemed");
        var text = txt?txt:dom.find("a").text();
        var ptext =dom.parent().prev().find("label").text();

        this.Positioning = '<a href="#">首页</a> <a href="">'+ptext+'</a>  <a><cite>'+text+'</cite></a>'
      } else {
        this.Positioning = localStorage.getItem('navigation');
      }
    },
    goBack:function(){
      localStorage.setItem('status','0');
      parent.location.href = "main.html"
    }
  }
})

$(".side-nav-tree dd").click(function () {
  setTimeout(function () {
    window.vm.Positioning = localStorage.getItem('navigation');
  }, 200);
});